#ifndef SERVER_WIGHT_H
#define SERVER_WIGHT_H

#include <QMainWindow>
#include <QTcpServer>
#include <QTcpSocket>
#include <QDebug>
#include <QLabel>
#include <QPushButton>
#include <QLineEdit>
#include <QTextEdit>
#include <QNetworkAccessManager>
#include <QNetworkRequest>
#include <QNetworkReply>
#include <QJsonObject>
#include <QJsonDocument>
#include <QJsonArray>
#include <QThread>
#include <QVBoxLayout>
namespace Ui {
class Server_wight;
}

class Server_wight : public QMainWindow
{
    Q_OBJECT

public:
    explicit Server_wight(QWidget *parent = 0);
    ~Server_wight();
    QTcpServer *Ser;
    QTcpSocket *Cli;
    QLabel *Host,*Port,*info_type,*rec_IP,*rec_Port,*post_IP,*post_Port,*url_ip,*url_port
    ,*imageLabel;
    QPushButton *send_info;
    QLineEdit *insert_IP,*insert_Port,*insert_tpye,*insert_rec_IP,*insert_rec_port,
    *insert_post_IP,*insert_post_port,*in_url_ip,*in_url_port;
    QTextEdit *rce_show;
    QNetworkReply *reply;
    QTcpServer *host_server;
    QTcpSocket *cli_date;
    QWidget *widget;
    QVBoxLayout *layout;
public slots:
    void send_info_ser();
    void onReplyFinished(QNetworkReply* reply);
    void slot_textChange_ip(QString text);
    void slot_textChange_port(QString text);
    void recv_connect();
    void read_date();
private:
    Ui::Server_wight *ui;
};


#endif // SERVER_WIGHT_H
